package com.pq.controller;

import com.pq.pojo.order.Site;
import com.pq.service.order.SiteService;
import com.pq.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SiteController {

    @Autowired
    private SiteService siteService;

    @ResponseBody
    @RequestMapping("/doFindUserSiteBySiteId")
    public SysResult findUserSiteBySiteId(Integer siteId){
        Site site = siteService.findUserSiteBySiteId(siteId);
        return SysResult.success(site);
    }

    @RequestMapping("/doFindUserSiteByUserId")
    public Site findUserSiteByUserId(Integer userId, Integer siteType){
        siteService.findUserSiteByUserId(userId, siteType);
        return null;
    }
}
